from django.urls import path, include
from . import views

from django.urls import path, include
from django.http import HttpResponse
from . import views

def debug_urls(request):
    """调试URL配置"""
    from django.urls import get_resolver
    resolver = get_resolver()
    urls = [str(p) for p in resolver.url_patterns]
    return HttpResponse(f"<pre>{'<br>'.join(urls)}</pre>")

urlpatterns = [
    path('map-shops/', views.MapShopsView.as_view(), name='map_shops'),
    path('nearby-shops/', views.NearbySearchView.as_view(), name='nearby_shops'),
    path('_shop_list/', views.render_shop_list_partial, name='render_shop_list'),
    path('debug-urls/', debug_urls, name='debug_urls'),
]